package com.example.myapplication;

import android.app.ListActivity;
import android.graphics.SumPathEffect;
import android.os.Bundle;
import android.widget.SimpleAdapter;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import java.util.ArrayList;
import java.util.HashMap;

public class MyList2Activity extends ListActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ArrayList listItems=new ArrayList<HashMap<String,String>>();
        for(int i=0;i<10;i++){
            HashMap<String,String> map=new HashMap<String,String>();
            map.put("ItemTitle","Rate:"+i);
            map.put("ItemDetail","detail"+i);
            listItems.add(map);
        }
        SimpleAdapter listItemAdapter=new SimpleAdapter(this,listItems,R.layout.list_item,new String[]{"ItemTitle","ItemDeatil"},new int[]{R.id.itemTitle,R.id.itemDetail});
    }
}